package chapter02
import scala.collection.mutable
import scala.util.Random
object Test26_Set2 {
  def main(args: Array[String]): Unit = {
    //生成一注双色球 红球 6个 1-33 蓝球 1个 1-16
    //随机函数 0-9
    val redBalls = mutable.Set[Int]()
    while(redBalls.size<6){
      val i = Random.nextInt(33) + 1
      redBalls.add(i)
    }
    println(redBalls)
    val blueBall = Random.nextInt(16)+1
    println("红球为："+redBalls.mkString(",")+"蓝球为："+blueBall)
  }
}
